class ssq {
  String _reason;
  Result _result;
  int _errorCode;

  ssq({String reason, Result result, int errorCode}) {
    this._reason = reason;
    this._result = result;
    this._errorCode = errorCode;
  }

  String get reason => _reason;
  set reason(String reason) => _reason = reason;
  Result get result => _result;
  set result(Result result) => _result = result;
  int get errorCode => _errorCode;
  set errorCode(int errorCode) => _errorCode = errorCode;

  ssq.fromJson(Map<String, dynamic> json) {
    _reason = json['reason'];
    _result =
        json['result'] != null ? new Result.fromJson(json['result']) : null;
    _errorCode = json['error_code'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['reason'] = this._reason;
    if (this._result != null) {
      data['result'] = this._result.toJson();
    }
    data['error_code'] = this._errorCode;
    return data;
  }
}

class Result {
  String _lotteryId;
  String _lotteryName;
  String _lotteryRes;
  String _lotteryNo;
  String _lotteryDate;
  String _lotteryExdate;
  String _lotterySaleAmount;
  String _lotteryPoolAmount;
  List<LotteryPrize> _lotteryPrize;

  Result(
      {String lotteryId,
      String lotteryName,
      String lotteryRes,
      String lotteryNo,
      String lotteryDate,
      String lotteryExdate,
      String lotterySaleAmount,
      String lotteryPoolAmount,
      List<LotteryPrize> lotteryPrize}) {
    this._lotteryId = lotteryId;
    this._lotteryName = lotteryName;
    this._lotteryRes = lotteryRes;
    this._lotteryNo = lotteryNo;
    this._lotteryDate = lotteryDate;
    this._lotteryExdate = lotteryExdate;
    this._lotterySaleAmount = lotterySaleAmount;
    this._lotteryPoolAmount = lotteryPoolAmount;
    this._lotteryPrize = lotteryPrize;
  }

  String get lotteryId => _lotteryId;
  set lotteryId(String lotteryId) => _lotteryId = lotteryId;
  String get lotteryName => _lotteryName;
  set lotteryName(String lotteryName) => _lotteryName = lotteryName;
  String get lotteryRes => _lotteryRes;
  set lotteryRes(String lotteryRes) => _lotteryRes = lotteryRes;
  String get lotteryNo => _lotteryNo;
  set lotteryNo(String lotteryNo) => _lotteryNo = lotteryNo;
  String get lotteryDate => _lotteryDate;
  set lotteryDate(String lotteryDate) => _lotteryDate = lotteryDate;
  String get lotteryExdate => _lotteryExdate;
  set lotteryExdate(String lotteryExdate) => _lotteryExdate = lotteryExdate;
  String get lotterySaleAmount => _lotterySaleAmount;
  set lotterySaleAmount(String lotterySaleAmount) =>
      _lotterySaleAmount = lotterySaleAmount;
  String get lotteryPoolAmount => _lotteryPoolAmount;
  set lotteryPoolAmount(String lotteryPoolAmount) =>
      _lotteryPoolAmount = lotteryPoolAmount;
  List<LotteryPrize> get lotteryPrize => _lotteryPrize;
  set lotteryPrize(List<LotteryPrize> lotteryPrize) =>
      _lotteryPrize = lotteryPrize;

  Result.fromJson(Map<String, dynamic> json) {
    _lotteryId = json['lottery_id'];
    _lotteryName = json['lottery_name'];
    _lotteryRes = json['lottery_res'];
    _lotteryNo = json['lottery_no'];
    _lotteryDate = json['lottery_date'];
    _lotteryExdate = json['lottery_exdate'];
    _lotterySaleAmount = json['lottery_sale_amount'];
    _lotteryPoolAmount = json['lottery_pool_amount'];
    if (json['lottery_prize'] != null) {
      _lotteryPrize = new List<LotteryPrize>();
      json['lottery_prize'].forEach((v) {
        _lotteryPrize.add(new LotteryPrize.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['lottery_id'] = this._lotteryId;
    data['lottery_name'] = this._lotteryName;
    data['lottery_res'] = this._lotteryRes;
    data['lottery_no'] = this._lotteryNo;
    data['lottery_date'] = this._lotteryDate;
    data['lottery_exdate'] = this._lotteryExdate;
    data['lottery_sale_amount'] = this._lotterySaleAmount;
    data['lottery_pool_amount'] = this._lotteryPoolAmount;
    if (this._lotteryPrize != null) {
      data['lottery_prize'] =
          this._lotteryPrize.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class LotteryPrize {
  String _prizeName;
  String _prizeNum;
  String _prizeAmount;
  String _prizeRequire;

  LotteryPrize(
      {String prizeName,
      String prizeNum,
      String prizeAmount,
      String prizeRequire}) {
    this._prizeName = prizeName;
    this._prizeNum = prizeNum;
    this._prizeAmount = prizeAmount;
    this._prizeRequire = prizeRequire;
  }

  String get prizeName => _prizeName;
  set prizeName(String prizeName) => _prizeName = prizeName;
  String get prizeNum => _prizeNum;
  set prizeNum(String prizeNum) => _prizeNum = prizeNum;
  String get prizeAmount => _prizeAmount;
  set prizeAmount(String prizeAmount) => _prizeAmount = prizeAmount;
  String get prizeRequire => _prizeRequire;
  set prizeRequire(String prizeRequire) => _prizeRequire = prizeRequire;

  LotteryPrize.fromJson(Map<String, dynamic> json) {
    _prizeName = json['prize_name'];
    _prizeNum = json['prize_num'];
    _prizeAmount = json['prize_amount'];
    _prizeRequire = json['prize_require'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['prize_name'] = this._prizeName;
    data['prize_num'] = this._prizeNum;
    data['prize_amount'] = this._prizeAmount;
    data['prize_require'] = this._prizeRequire;
    return data;
  }
}
